#ifndef __DXT_TABLES_H__
#define __DXT_TABLES_H__

static const unsigned char quantRB[256 + 16] =
{
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08,
   0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10,
   0x10, 0x10, 0x10, 0x10, 0x10, 0x18, 0x18, 0x18,
   0x18, 0x18, 0x18, 0x18, 0x18, 0x21, 0x21, 0x21,
   0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x29, 0x29,
   0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x31, 0x31,
   0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x39, 0x39,
   0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x42, 0x42,
   0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x4a, 0x4a,
   0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x52,
   0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x5a,
   0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x63,
   0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x6b,
   0x6b, 0x6b, 0x6b, 0x6b, 0x6b, 0x6b, 0x6b, 0x6b,
   0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73, 0x73,
   0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b, 0x7b,
   0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
   0x8c, 0x8c, 0x8c, 0x8c, 0x8c, 0x8c, 0x8c, 0x8c,
   0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94,
   0x94, 0x9c, 0x9c, 0x9c, 0x9c, 0x9c, 0x9c, 0x9c,
   0x9c, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
   0xa5, 0xad, 0xad, 0xad, 0xad, 0xad, 0xad, 0xad,
   0xad, 0xb5, 0xb5, 0xb5, 0xb5, 0xb5, 0xb5, 0xb5,
   0xb5, 0xb5, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd, 0xbd,
   0xbd, 0xbd, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6,
   0xc6, 0xc6, 0xce, 0xce, 0xce, 0xce, 0xce, 0xce,
   0xce, 0xce, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6,
   0xd6, 0xd6, 0xde, 0xde, 0xde, 0xde, 0xde, 0xde,
   0xde, 0xde, 0xde, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7,
   0xe7, 0xe7, 0xe7, 0xef, 0xef, 0xef, 0xef, 0xef,
   0xef, 0xef, 0xef, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7,
   0xf7, 0xf7, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff,
   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
};

static const unsigned char quantG[256 + 16] =
{
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x08,
   0x08, 0x08, 0x08, 0x0c, 0x0c, 0x0c, 0x0c, 0x10,
   0x10, 0x10, 0x10, 0x14, 0x14, 0x14, 0x14, 0x18,
   0x18, 0x18, 0x18, 0x1c, 0x1c, 0x1c, 0x1c, 0x20,
   0x20, 0x20, 0x20, 0x24, 0x24, 0x24, 0x24, 0x28,
   0x28, 0x28, 0x28, 0x2c, 0x2c, 0x2c, 0x2c, 0x30,
   0x30, 0x30, 0x30, 0x34, 0x34, 0x34, 0x34, 0x38,
   0x38, 0x38, 0x38, 0x3c, 0x3c, 0x3c, 0x3c, 0x41,
   0x41, 0x41, 0x41, 0x45, 0x45, 0x45, 0x45, 0x49,
   0x49, 0x49, 0x49, 0x4d, 0x4d, 0x4d, 0x4d, 0x51,
   0x51, 0x51, 0x51, 0x55, 0x55, 0x55, 0x55, 0x55,
   0x59, 0x59, 0x59, 0x59, 0x5d, 0x5d, 0x5d, 0x5d,
   0x61, 0x61, 0x61, 0x61, 0x65, 0x65, 0x65, 0x65,
   0x69, 0x69, 0x69, 0x69, 0x6d, 0x6d, 0x6d, 0x6d,
   0x71, 0x71, 0x71, 0x71, 0x75, 0x75, 0x75, 0x75,
   0x79, 0x79, 0x79, 0x79, 0x7d, 0x7d, 0x7d, 0x7d,
   0x82, 0x82, 0x82, 0x82, 0x86, 0x86, 0x86, 0x86,
   0x8a, 0x8a, 0x8a, 0x8a, 0x8e, 0x8e, 0x8e, 0x8e,
   0x92, 0x92, 0x92, 0x92, 0x96, 0x96, 0x96, 0x96,
   0x9a, 0x9a, 0x9a, 0x9a, 0x9e, 0x9e, 0x9e, 0x9e,
   0xa2, 0xa2, 0xa2, 0xa2, 0xa6, 0xa6, 0xa6, 0xa6,
   0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xae, 0xae, 0xae,
   0xae, 0xb2, 0xb2, 0xb2, 0xb2, 0xb6, 0xb6, 0xb6,
   0xb6, 0xba, 0xba, 0xba, 0xba, 0xbe, 0xbe, 0xbe,
   0xbe, 0xc3, 0xc3, 0xc3, 0xc3, 0xc7, 0xc7, 0xc7,
   0xc7, 0xcb, 0xcb, 0xcb, 0xcb, 0xcf, 0xcf, 0xcf,
   0xcf, 0xd3, 0xd3, 0xd3, 0xd3, 0xd7, 0xd7, 0xd7,
   0xd7, 0xdb, 0xdb, 0xdb, 0xdb, 0xdf, 0xdf, 0xdf,
   0xdf, 0xe3, 0xe3, 0xe3, 0xe3, 0xe7, 0xe7, 0xe7,
   0xe7, 0xeb, 0xeb, 0xeb, 0xeb, 0xef, 0xef, 0xef,
   0xef, 0xf3, 0xf3, 0xf3, 0xf3, 0xf7, 0xf7, 0xf7,
   0xf7, 0xfb, 0xfb, 0xfb, 0xfb, 0xff, 0xff, 0xff,
   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
};

static const unsigned char omatch5[256][2] =
{
   {0x00, 0x00}, {0x00, 0x00}, {0x00, 0x01}, {0x00, 0x01},
   {0x01, 0x00}, {0x01, 0x00}, {0x01, 0x00}, {0x01, 0x01},
   {0x01, 0x01}, {0x01, 0x01}, {0x01, 0x02}, {0x00, 0x04},
   {0x02, 0x01}, {0x02, 0x01}, {0x02, 0x01}, {0x02, 0x02},
   {0x02, 0x02}, {0x02, 0x02}, {0x02, 0x03}, {0x01, 0x05},
   {0x03, 0x02}, {0x03, 0x02}, {0x04, 0x00}, {0x03, 0x03},
   {0x03, 0x03}, {0x03, 0x03}, {0x03, 0x04}, {0x03, 0x04},
   {0x03, 0x04}, {0x03, 0x05}, {0x04, 0x03}, {0x04, 0x03},
   {0x05, 0x02}, {0x04, 0x04}, {0x04, 0x04}, {0x04, 0x05},
   {0x04, 0x05}, {0x05, 0x04}, {0x05, 0x04}, {0x05, 0x04},
   {0x06, 0x03}, {0x05, 0x05}, {0x05, 0x05}, {0x05, 0x06},
   {0x04, 0x08}, {0x06, 0x05}, {0x06, 0x05}, {0x06, 0x05},
   {0x06, 0x06}, {0x06, 0x06}, {0x06, 0x06}, {0x06, 0x07},
   {0x05, 0x09}, {0x07, 0x06}, {0x07, 0x06}, {0x08, 0x04},
   {0x07, 0x07}, {0x07, 0x07}, {0x07, 0x07}, {0x07, 0x08},
   {0x07, 0x08}, {0x07, 0x08}, {0x07, 0x09}, {0x08, 0x07},
   {0x08, 0x07}, {0x09, 0x06}, {0x08, 0x08}, {0x08, 0x08},
   {0x08, 0x09}, {0x08, 0x09}, {0x09, 0x08}, {0x09, 0x08},
   {0x09, 0x08}, {0x0a, 0x07}, {0x09, 0x09}, {0x09, 0x09},
   {0x09, 0x0a}, {0x08, 0x0c}, {0x0a, 0x09}, {0x0a, 0x09},
   {0x0a, 0x09}, {0x0a, 0x0a}, {0x0a, 0x0a}, {0x0a, 0x0a},
   {0x0a, 0x0b}, {0x09, 0x0d}, {0x0b, 0x0a}, {0x0b, 0x0a},
   {0x0c, 0x08}, {0x0b, 0x0b}, {0x0b, 0x0b}, {0x0b, 0x0b},
   {0x0b, 0x0c}, {0x0b, 0x0c}, {0x0b, 0x0c}, {0x0b, 0x0d},
   {0x0c, 0x0b}, {0x0c, 0x0b}, {0x0d, 0x0a}, {0x0c, 0x0c},
   {0x0c, 0x0c}, {0x0c, 0x0d}, {0x0c, 0x0d}, {0x0d, 0x0c},
   {0x0d, 0x0c}, {0x0d, 0x0c}, {0x0e, 0x0b}, {0x0d, 0x0d},
   {0x0d, 0x0d}, {0x0d, 0x0e}, {0x0c, 0x10}, {0x0e, 0x0d},
   {0x0e, 0x0d}, {0x0e, 0x0d}, {0x0e, 0x0e}, {0x0e, 0x0e},
   {0x0e, 0x0e}, {0x0e, 0x0f}, {0x0d, 0x11}, {0x0f, 0x0e},
   {0x0f, 0x0e}, {0x10, 0x0c}, {0x0f, 0x0f}, {0x0f, 0x0f},
   {0x0f, 0x0f}, {0x0f, 0x10}, {0x0f, 0x10}, {0x0f, 0x10},
   {0x0f, 0x11}, {0x10, 0x0f}, {0x10, 0x0f}, {0x11, 0x0e},
   {0x10, 0x10}, {0x10, 0x10}, {0x10, 0x11}, {0x10, 0x11},
   {0x11, 0x10}, {0x11, 0x10}, {0x11, 0x10}, {0x12, 0x0f},
   {0x11, 0x11}, {0x11, 0x11}, {0x11, 0x12}, {0x10, 0x14},
   {0x12, 0x11}, {0x12, 0x11}, {0x12, 0x11}, {0x12, 0x12},
   {0x12, 0x12}, {0x12, 0x12}, {0x12, 0x13}, {0x11, 0x15},
   {0x13, 0x12}, {0x13, 0x12}, {0x14, 0x10}, {0x13, 0x13},
   {0x13, 0x13}, {0x13, 0x13}, {0x13, 0x14}, {0x13, 0x14},
   {0x13, 0x14}, {0x13, 0x15}, {0x14, 0x13}, {0x14, 0x13},
   {0x15, 0x12}, {0x14, 0x14}, {0x14, 0x14}, {0x14, 0x15},
   {0x14, 0x15}, {0x15, 0x14}, {0x15, 0x14}, {0x15, 0x14},
   {0x16, 0x13}, {0x15, 0x15}, {0x15, 0x15}, {0x15, 0x16},
   {0x14, 0x18}, {0x16, 0x15}, {0x16, 0x15}, {0x16, 0x15},
   {0x16, 0x16}, {0x16, 0x16}, {0x16, 0x16}, {0x16, 0x17},
   {0x15, 0x19}, {0x17, 0x16}, {0x17, 0x16}, {0x18, 0x14},
   {0x17, 0x17}, {0x17, 0x17}, {0x17, 0x17}, {0x17, 0x18},
   {0x17, 0x18}, {0x17, 0x18}, {0x17, 0x19}, {0x18, 0x17},
   {0x18, 0x17}, {0x19, 0x16}, {0x18, 0x18}, {0x18, 0x18},
   {0x18, 0x19}, {0x18, 0x19}, {0x19, 0x18}, {0x19, 0x18},
   {0x19, 0x18}, {0x1a, 0x17}, {0x19, 0x19}, {0x19, 0x19},
   {0x19, 0x1a}, {0x18, 0x1c}, {0x1a, 0x19}, {0x1a, 0x19},
   {0x1a, 0x19}, {0x1a, 0x1a}, {0x1a, 0x1a}, {0x1a, 0x1a},
   {0x1a, 0x1b}, {0x19, 0x1d}, {0x1b, 0x1a}, {0x1b, 0x1a},
   {0x1c, 0x18}, {0x1b, 0x1b}, {0x1b, 0x1b}, {0x1b, 0x1b},
   {0x1b, 0x1c}, {0x1b, 0x1c}, {0x1b, 0x1c}, {0x1b, 0x1d},
   {0x1c, 0x1b}, {0x1c, 0x1b}, {0x1d, 0x1a}, {0x1c, 0x1c},
   {0x1c, 0x1c}, {0x1c, 0x1d}, {0x1c, 0x1d}, {0x1d, 0x1c},
   {0x1d, 0x1c}, {0x1d, 0x1c}, {0x1e, 0x1b}, {0x1d, 0x1d},
   {0x1d, 0x1d}, {0x1d, 0x1e}, {0x1d, 0x1e}, {0x1e, 0x1d},
   {0x1e, 0x1d}, {0x1e, 0x1d}, {0x1e, 0x1e}, {0x1e, 0x1e},
   {0x1e, 0x1e}, {0x1e, 0x1f}, {0x1e, 0x1f}, {0x1f, 0x1e},
   {0x1f, 0x1e}, {0x1f, 0x1e}, {0x1f, 0x1f}, {0x1f, 0x1f},
};

static const unsigned char omatch6[256][2] =
{
   {0x00, 0x00}, {0x00, 0x01}, {0x01, 0x00}, {0x01, 0x01},
   {0x01, 0x01}, {0x01, 0x02}, {0x02, 0x01}, {0x02, 0x02},
   {0x02, 0x02}, {0x02, 0x03}, {0x03, 0x02}, {0x03, 0x03},
   {0x03, 0x03}, {0x03, 0x04}, {0x04, 0x03}, {0x04, 0x04},
   {0x04, 0x04}, {0x04, 0x05}, {0x05, 0x04}, {0x05, 0x05},
   {0x05, 0x05}, {0x05, 0x06}, {0x06, 0x05}, {0x00, 0x11},
   {0x06, 0x06}, {0x06, 0x07}, {0x07, 0x06}, {0x02, 0x10},
   {0x07, 0x07}, {0x07, 0x08}, {0x08, 0x07}, {0x03, 0x11},
   {0x08, 0x08}, {0x08, 0x09}, {0x09, 0x08}, {0x05, 0x10},
   {0x09, 0x09}, {0x09, 0x0a}, {0x0a, 0x09}, {0x06, 0x11},
   {0x0a, 0x0a}, {0x0a, 0x0b}, {0x0b, 0x0a}, {0x08, 0x10},
   {0x0b, 0x0b}, {0x0b, 0x0c}, {0x0c, 0x0b}, {0x09, 0x11},
   {0x0c, 0x0c}, {0x0c, 0x0d}, {0x0d, 0x0c}, {0x0b, 0x10},
   {0x0d, 0x0d}, {0x0d, 0x0e}, {0x0e, 0x0d}, {0x0c, 0x11},
   {0x0e, 0x0e}, {0x0e, 0x0f}, {0x0f, 0x0e}, {0x0e, 0x10},
   {0x0f, 0x0f}, {0x0f, 0x10}, {0x10, 0x0e}, {0x10, 0x0f},
   {0x11, 0x0e}, {0x10, 0x10}, {0x10, 0x11}, {0x11, 0x10},
   {0x12, 0x0f}, {0x11, 0x11}, {0x11, 0x12}, {0x12, 0x11},
   {0x14, 0x0e}, {0x12, 0x12}, {0x12, 0x13}, {0x13, 0x12},
   {0x15, 0x0f}, {0x13, 0x13}, {0x13, 0x14}, {0x14, 0x13},
   {0x17, 0x0e}, {0x14, 0x14}, {0x14, 0x15}, {0x15, 0x14},
   {0x18, 0x0f}, {0x15, 0x15}, {0x15, 0x16}, {0x16, 0x15},
   {0x1a, 0x0e}, {0x16, 0x16}, {0x16, 0x17}, {0x17, 0x16},
   {0x1b, 0x0f}, {0x17, 0x17}, {0x17, 0x18}, {0x18, 0x17},
   {0x13, 0x21}, {0x18, 0x18}, {0x18, 0x19}, {0x19, 0x18},
   {0x15, 0x20}, {0x19, 0x19}, {0x19, 0x1a}, {0x1a, 0x19},
   {0x16, 0x21}, {0x1a, 0x1a}, {0x1a, 0x1b}, {0x1b, 0x1a},
   {0x18, 0x20}, {0x1b, 0x1b}, {0x1b, 0x1c}, {0x1c, 0x1b},
   {0x19, 0x21}, {0x1c, 0x1c}, {0x1c, 0x1d}, {0x1d, 0x1c},
   {0x1b, 0x20}, {0x1d, 0x1d}, {0x1d, 0x1e}, {0x1e, 0x1d},
   {0x1c, 0x21}, {0x1e, 0x1e}, {0x1e, 0x1f}, {0x1f, 0x1e},
   {0x1e, 0x20}, {0x1f, 0x1f}, {0x1f, 0x20}, {0x20, 0x1e},
   {0x20, 0x1f}, {0x21, 0x1e}, {0x20, 0x20}, {0x20, 0x21},
   {0x21, 0x20}, {0x22, 0x1f}, {0x21, 0x21}, {0x21, 0x22},
   {0x22, 0x21}, {0x24, 0x1e}, {0x22, 0x22}, {0x22, 0x23},
   {0x23, 0x22}, {0x25, 0x1f}, {0x23, 0x23}, {0x23, 0x24},
   {0x24, 0x23}, {0x27, 0x1e}, {0x24, 0x24}, {0x24, 0x25},
   {0x25, 0x24}, {0x28, 0x1f}, {0x25, 0x25}, {0x25, 0x26},
   {0x26, 0x25}, {0x2a, 0x1e}, {0x26, 0x26}, {0x26, 0x27},
   {0x27, 0x26}, {0x2b, 0x1f}, {0x27, 0x27}, {0x27, 0x28},
   {0x28, 0x27}, {0x23, 0x31}, {0x28, 0x28}, {0x28, 0x29},
   {0x29, 0x28}, {0x25, 0x30}, {0x29, 0x29}, {0x29, 0x2a},
   {0x2a, 0x29}, {0x26, 0x31}, {0x2a, 0x2a}, {0x2a, 0x2b},
   {0x2b, 0x2a}, {0x28, 0x30}, {0x2b, 0x2b}, {0x2b, 0x2c},
   {0x2c, 0x2b}, {0x29, 0x31}, {0x2c, 0x2c}, {0x2c, 0x2d},
   {0x2d, 0x2c}, {0x2b, 0x30}, {0x2d, 0x2d}, {0x2d, 0x2e},
   {0x2e, 0x2d}, {0x2c, 0x31}, {0x2e, 0x2e}, {0x2e, 0x2f},
   {0x2f, 0x2e}, {0x2e, 0x30}, {0x2f, 0x2f}, {0x2f, 0x30},
   {0x30, 0x2e}, {0x30, 0x2f}, {0x31, 0x2e}, {0x30, 0x30},
   {0x30, 0x31}, {0x31, 0x30}, {0x32, 0x2f}, {0x31, 0x31},
   {0x31, 0x32}, {0x32, 0x31}, {0x34, 0x2e}, {0x32, 0x32},
   {0x32, 0x33}, {0x33, 0x32}, {0x35, 0x2f}, {0x33, 0x33},
   {0x33, 0x34}, {0x34, 0x33}, {0x37, 0x2e}, {0x34, 0x34},
   {0x34, 0x35}, {0x35, 0x34}, {0x38, 0x2f}, {0x35, 0x35},
   {0x35, 0x36}, {0x36, 0x35}, {0x3a, 0x2e}, {0x36, 0x36},
   {0x36, 0x37}, {0x37, 0x36}, {0x3b, 0x2f}, {0x37, 0x37},
   {0x37, 0x38}, {0x38, 0x37}, {0x3d, 0x2e}, {0x38, 0x38},
   {0x38, 0x39}, {0x39, 0x38}, {0x3e, 0x2f}, {0x39, 0x39},
   {0x39, 0x3a}, {0x3a, 0x39}, {0x3a, 0x3a}, {0x3a, 0x3a},
   {0x3a, 0x3b}, {0x3b, 0x3a}, {0x3b, 0x3b}, {0x3b, 0x3b},
   {0x3b, 0x3c}, {0x3c, 0x3b}, {0x3c, 0x3c}, {0x3c, 0x3c},
   {0x3c, 0x3d}, {0x3d, 0x3c}, {0x3d, 0x3d}, {0x3d, 0x3d},
   {0x3d, 0x3e}, {0x3e, 0x3d}, {0x3e, 0x3e}, {0x3e, 0x3e},
   {0x3e, 0x3f}, {0x3f, 0x3e}, {0x3f, 0x3f}, {0x3f, 0x3f},
};

#endif /* __DXT_TABLES_H__ */
